import Vue from 'vue'
import VueRouter from 'vue-router'
import Login from '../views/Login.vue'
import customerHome from "../views/customerHome.vue";

Vue.use(VueRouter)

const routes = [
  {
    path:'/',
    name:'customerhome',
    component:()=>import('../views/customerHome.vue'),
    children:[
      {
        path: '/PGShop',
        name: 'PGShop',
        component: () => import('../customerViewComponents/PointGoodsShop/PointGoodsShop.vue')
      },
      {
        path:'/',
        name:'customerHome',
        component:()=>import('../customerHome/homepage/Home-page.vue')
      },
      {
        path:'/orderuser',
        name:'orderuser',
        component:()=>import('../customerHome/orderUser/orderuser.vue')
      },
      {
        path:'/goods',
        name:'goods',
        component:()=>import('../customerHome/goods/goods.vue')
      },
      {
        path:'/addressFront',
        name:'addressFront',
        component:()=>import('../customerHome/Addressmanagement/address.vue')
      },
      {
        path:'/5',
        name:'5',
        component:()=>import('../customerHome/Addressmanagement/customMyself')
      }
    ]

  },
  {
    path: '/register',
    name:'register',
    component: () => import('../views/register')
  },
  {
    path: '/Login',
    name:'Login',
    component: () => import('../views/Login')
  },

  {
    path: '/home',
    name: 'home',
    component: () => import(/* webpackChunkName: "about" */ '../views/Home.vue'),
    children:[
      {
        path:'/labelmanager',
        name:'labelmanager',
        component:() =>import('../components/commoditymanager/label.vue')
      },
      {
        path: '/commoditymanager',
        name:'commoditymanager',
        component: () => import('../components/commoditymanager/commoditymanager.vue')
      },
      {
        path:'/sortmanager',
        name:'sortmanager',
        component:() =>import('../components/commoditymanager/type.vue')
      },
      {
        path: '/ordermanager',
        name:'ordermanager',
        component: () => import('../components/ordermanager/ordermanager.vue')
      },
      {
        path: '/servicemanager',
        name:'servicemanager',
        component: () => import('../components/ordermanager/servicemanager.vue')
      },
      {
        path:'/addressManagement',
          name:'addressManagement',
          component:() =>import('../components/AddressManagement/Address.vue')
       },
      {
            path:'/homePage',
            name:'homePage',
            component:() =>import('../components/HomePageManagement/HomePage.vue')
      },
      {
        path:'/usermanager',
        name:'usermanager',
        component:() =>import('../components/UserManagement/userList')
      },
      {
        path:'/commentmanager',
        name:'commentmanager',
        component:() =>import('../components/commoditymanager/comments.vue')
      },
      {
        path:'/customers',
        name:'customers',
        component:() =>import('../components/CustomerManagement/customers.vue')
      },
      {
        path:'/blackList',
        name:'blackList',
        component:() =>import('../components/CustomerManagement/blackList.vue')
      },
      {
        path:'/rolemanager',
        name:'rolemanager',
        component:() =>import('../components/UserManagement/UserMyself')
      }
        ]
    }



]

const router = new VueRouter({
  routes
})

export default router
